<div id="content">
	<div class="row s_page_title">
		<sa-big-breadcrumbs [items]="['项目管理','预约维修[小程序]','车辆绑定列']" icon="fa fa-smile-o" class="col-xs-12 col-sm-7 col-md-7 col-lg-4"></sa-big-breadcrumbs>
	</div>
	<sa-widgets-grid>
		<div class="s_table">
			<div sa-widget [editbutton]="false" color="darken" class="clearfix">
				<header><span class="widget-icon"> <i class="fa fa-table"></i> </span><h2>车辆绑定列</h2></header>
				<div>
					<div class="widget-body no-padding">
						<div class="page-header clearfix s_table_opreation">
							<div class="left page-header-btn" style="width: calc(100% - 230px);">
                                <div class="top_module">
									<span class="module_text">车牌号码
									</span><div class="s_hover_box">
										<select   class="select2"  id="carNumberSelect2">
											<option value=''></option>
										</select>
										<div class="s_del_icon" (click)='del_carNumber()'>x</div>
									</div>
								</div>

								<div class="selectDate top_module">
									<table-select-date [notInit]='true' (outerTime)="getSelectTableTime($event)" ></table-select-date>
								</div>
								<!-- <div class="top_module top_module_box">
									<span class="top_module_label module_text">手机号</span>
									<input class="module_inp" [(ngModel)]="tableSearch.phone" type="text"/>
								</div> -->
								
								<button class="btn btn-primary" (click)="tableSearch()">查询</button>
							</div>
							<div class="right top-search">
								<input type="text" [(ngModel)]="tableParam.searchKey" (change)="tableSearch()" class="search-input" placeholder="手机号码/姓名/车牌号码/设备ID">
								<span class="top-search-box">
							        <button class="top-search-btn" type="button" (click)="tableSearch()"> <i class="fa fa-search"></i></button>
							    </span>
							</div>
						</div>
						<div class="table_scroll">
							<table class="display dataTables responsive table table-striped table-bordered table-hover dataTable s_h5_table">
								<thead>
									<tr>
										<th>小程序名称</th>
										<th>车牌号码</th>
										<th>设备ID</th>
										<th>手机号码</th>
										<th>姓名</th>
										<th>昵称</th>
										<th>头像</th>
										<th>绑定时间</th>
										<th *ngIf="isShowDelete">操作</th>
									</tr>
								</thead>
								<tbody>
									<tr *ngFor="let row of tableData" >
										<td>{{row.appletsCode=='0004'?'随身修':'随你运'}}</td>
										<td>{{row.carNumber}}
											<button type="button" style="margin-left:10px" (click)="unBindCar(row)">解绑</button>
										</td>
										<td>{{row.deviceId}}</td>
										<td>{{row.phone}}</td>
										<td>{{row.name}}</td>
										<td>{{row.nickName}}</td>
										<td><img [src]="row.userPhoto" class="imgPhoto"/></td>
										<td>{{row.carCreateTime}}</td>
										<td *ngIf="isShowDelete">
											<button type="button" (click)="deleteRow(row)">删除</button>
                                            <button type="button" (click)="updateRow(row,itemModal)">编辑</button>
                                        </td>
									</tr>
								</tbody>
							</table>
						</div>
						<div class="table-fix clearfix">
							<paginator [totalRecords]="totalCount"
						           [rows]="pageSize"
						           [currentPage]="curPage - 1"
						           (onPageChange)="paginate($event)">
							</paginator>
							<button type="button" class="btn default refresh_btn" (click)="refresh()"><i class="fa fa-refresh"></i></button>
						</div>
					</div>
				</div>
			</div>
		</div>
	</sa-widgets-grid>
</div>
<!-- 绑定车辆编辑   弹窗-->
<section bsModal #itemModal="bs-modal"  class="modal fade" role="dialog" tabindex="-1" aria-labelledby="myLargeModalLabel" aria-hidden="true" data-backdrop="static" data-keyboard="false">
	<div class="modal-dialog modal-lg">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" (click)="itemModalClose(itemModal)" aria-label="Close"><span aria-hidden="true">&times;</span></button>     
				<h4 class="modal-title">绑定车辆编辑</h4>
			</div>
			<form id="bindCarFrom"  class="form-horizontal" role="form" novalidate="novalidate" [saBootstrapValidator]="bindCarvalidatorOptions">
				<div class="modal-body">
					<div class="row form-horizontal">
						<div class="form-group col-xs-12">
							<label class="col-xs-3 control-label">姓名：</label>
							<div class="col-xs-9">
								<input class="form-control" disabled [(ngModel)]='rowContent.name' name="name"  placeholder="姓名"/>
							</div>
						</div>
						<div class="form-group col-xs-12">
							<label class="col-xs-3 control-label">手机号：</label>
							<div class="col-xs-9">
								<input class="form-control" disabled [(ngModel)]='rowContent.phone' name="phone"  placeholder="手机号"/>
							</div>
						</div>
						<div class="form-group col-xs-12">
							<label class="col-xs-3 control-label">车牌号：</label>
							<!-- <div class="col-xs-9">
								<input class="form-control"  [(ngModel)]='rowContent.carNumber'  placeholder="请输入车牌号"/>
							</div> -->
							<div class="col-sm-9">
								<input type="hidden"  class="form-control" name='carNumberInput' id="carNumberInput" [(ngModel)]='rowContent.carNumber'>
								<div class="s_hover_box" style="width:100%" >
									<select   class="select2 form-control"  id="carNumberListSelect2" style="width:100%" >
										<option value=''></option>
									</select>
									<div class="s_del_icon" style="top: 9px;" (click)='del_carNumber2()'>x</div>
								</div>
							</div>
						</div>
					</div>
				</div>
			</form>
			<div class="modal-footer">
				<button type="button" class="btn btn-default" (click)="itemModalClose(itemModal)">取消</button>
				<button type="button" class="btn btn-primary" (click)="itemModalSubmit(itemModal)">确认</button>
			</div>
		</div>
	</div>
</section>
<!-- 绑定车辆编辑 弹窗end-->	
<style>
	.imgPhoto{
		width: 30px;
	}

	#select2-carNumberListSelect2-container{
		line-height: 33px!important;
	}
</style>